package com.bgrconsulting.stockorderentry.service.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.xml.bind.annotation.XmlRootElement;
import javax.jdo.annotations.IdentityType;

import com.google.appengine.api.datastore.Key;

@XmlRootElement(name = "account")
@PersistenceCapable
public class Account {
	
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
	
	@Persistent
	private String masterAccount;
	
	@Persistent
	private String accountDesc;
	
	@Persistent
	private String accountId;
	
	@Persistent
	private String marginLevel;
	
	@Persistent
	private String optionLevel;
	
	@Persistent
	private Double netAccountValue;
	
	@Persistent
	private String registrationType;
	
	@Persistent
	private AccountBalance accountBalance;
	
	@Persistent
	private DTBalance dtBalance;
	
	//@Persistent
	private MarginAccountBalance marginAccountBalance;
	
	@Persistent 
	private CashAccountBalance cashAccountBalance;
	
	public Account(String masterAccount,
			String accountDesc, 
			String accountId, 
			String marginLevel, 
			String optionLevel, 
			Double netAccountValue, 
			String registrationType,
			AccountBalance accountBalance,
			DTBalance dtBalance,
			MarginAccountBalance marginAccountBalance,
			CashAccountBalance cashAccountBalance
			) 
	{
		this.masterAccount = masterAccount;
		this.accountDesc = accountDesc;
		this.accountId = accountId;
		this.marginLevel = marginLevel;
		this.optionLevel = optionLevel;
		this.netAccountValue = netAccountValue;
		this.registrationType = registrationType;
		this.accountBalance = accountBalance;
		this.dtBalance = dtBalance;
		this.marginAccountBalance = marginAccountBalance;
		this.cashAccountBalance = cashAccountBalance;
	}
	
	public Account(String accountDesc, 
			String accountId, 
			String marginLevel, 
			String optionLevel, 
			Double netAccountValue, 
			String registrationType
			) 
	{
		this.accountDesc = accountDesc;
		this.accountId = accountId;
		this.marginLevel = marginLevel;
		this.optionLevel = optionLevel;
		this.netAccountValue = netAccountValue;
		this.registrationType = registrationType;
	}
	
	public Account() {
	
	}
	
	
	
	public void setMasterAccount(String masterAccount) {
		this.masterAccount = masterAccount;
	}
	
	public String getMasterAccount() {
		return this.masterAccount;
	}

	
	public void setAccountDesc(String accountDesc) {
		this.accountDesc = accountDesc;
	}
	
	public String getAccountDesc() {
		return this.accountDesc;
	}
	
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}
	
	public String getAccountId() {
		return this.accountId;
	}
	
	public void setMarginLevel(String marginLevel) {
		this.marginLevel = marginLevel;
	}
	
	public String getMarginLevel() {
		return this.marginLevel;
	}
	
	public String getOptionLevel() {
		return this.optionLevel;
	}
	
	public void setNetAccountValue(Double netAccountValue) {
		this.netAccountValue = netAccountValue;
	}
	
	public Double  getNetAccountValue() {
		return this.netAccountValue;
	}
	
	public void setRegistrationType(String registrationType) {
	    this.registrationType = registrationType;
	}
	
	public String getRegistrationType() {
	    return this.registrationType;
	}
	
	public void setKey(Key key) {
	    this.key = key;
	}
	
	public Key getKey() {
	    return this.key;
	}
	
	
	public void setAccountBalance(AccountBalance accountBalance) {
	    this.accountBalance = accountBalance;
	}
	
	public AccountBalance getAccountBalance() {
	    return this.accountBalance;
	}
	
	public void setDTBalance(DTBalance dtBalance) {
	    this.dtBalance = dtBalance;
	} 
	
	public DTBalance getDTBalance() {
	    return this.dtBalance;
	}
	
	
	public void setMarginAccountBalance(MarginAccountBalance marginAccountBalance) {
	    this.marginAccountBalance = marginAccountBalance;
	}
	
	public MarginAccountBalance getMarginAccountBalance() {
	    return this.marginAccountBalance;
	}
	
}
